﻿using System.Collections;
using System.Collections.Generic;
using PathologicalGames;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

public class MySkillPoolIcon : MonoBehaviour,IPointerClickHandler
{
    private SkillIconInfo info;
    private Image IconImg;

    void Awake()
    {
        IconImg = GetComponent<Image>();
    }

    public void SetInfo(ushort SkillID)
    {
        info = MatchManager._instance.GetSkillInfo(SkillID);
        IconImg.sprite = IconSpriteManager._instance.GetSkillIconFromIndex(SkillID);
    }

    public void OnPointerClick(PointerEventData eventData)
    {
        SkillInfoWindowManager._instance.SetSkillInfo(info.SkillID);
    }

    /// <summary>
    /// 图标回收到池内
    /// </summary>
    public void GCIcon()
    {
        
    }
}
